#pragma once
#include <vector>
#include <opencv2/core.hpp>

struct DetectedObject
{
	int classId;
	float confidence;
	float x;
	float y;
	float width;
	float height;

	DetectedObject()
	{
		classId = -1;
		confidence = 0.0;
		x = 0.0f;
		y = 0.0f;
		width = 0.0f;
		height = 0.0f;
	}
};

class BaseDetector
{
public:
	BaseDetector();

	virtual void initialize() = 0;
	virtual void detect(const cv::Mat& image, std::vector<DetectedObject>& retObjs) = 0;

	inline void setInstanceName(const std::string name) { _instanceName = name; }
	inline std::string getInstanceName() { return _instanceName; }

	inline void setModelFile(const std::wstring path) { _modelFilePath = path; }
	inline std::wstring getModelFile() { return _modelFilePath; }

	inline void enableCUDA(bool enable) { _useCUDA = enable; }
	inline bool cudaEnabled() { return _useCUDA; }

private:
	std::string _instanceName;
	std::wstring _modelFilePath;
	bool _useCUDA;
};

